home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / GCC 1.37.1r14 / usr / gcc-1.37.1r14 / object oriented files / CARArray.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-10  |  1.7 KB  |  63 lines  |  [TEXT/KAHL]

  1. #pragma once
  2.  
  3. #include "CArray.h"
  4.  
  5. #define    N_UNDF    0x00        /* undefined */
  6. #define    N_ABS    0x02        /* absolute address */
  7. #define    N_TEXT    0x04        /* text segment */
  8. #define    N_DATA    0x06        /* data segment */
  9. #define    N_BSS    0x08        /* bss segment */
  10. #define    N_COMM    0x12        /* common reference */
  11. #define    N_FN    0x1e        /* file name */
  12.  
  13. #define    N_EXT    0x01        /* external (global) bit, OR'ed in */
  14. #define    N_TYPE    0x1e        /* mask for all the type bits */
  15.  
  16. struct exec 
  17.     {
  18.     unsigned short    a_mid;        /* machine ID */
  19.     unsigned short    a_magic;    /* magic number */
  20.     unsigned long    a_text;        /* text segment size */
  21.     unsigned long    a_data;        /* initialized data size */
  22.     unsigned long    a_bss;        /* uninitialized data size */
  23.     unsigned long    a_syms;        /* symbol table size */
  24.     unsigned long    a_entry;    /* entry point */
  25.     unsigned long    a_trsize;    /* text relocation size */
  26.     unsigned long    a_drsize;    /* data relocation size */
  27.     };
  28.  
  29. struct nlist 
  30.     {
  31.     union {
  32.         char *n_name;    /* symbol name (in memory) */
  33.         long n_strx;    /* file string table offset (on disk) */
  34.             }
  35.     n_un;
  36.     unsigned char n_type;    /* type defines */
  37.     char n_other;        /* spare */
  38.     short n_desc;        /* used by stab entries */
  39.     unsigned long n_value;    /* address/value of the symbol */
  40.     };
  41.  
  42. #define    ARMAG        "!<arch>\n"    /* ar "magic number" */
  43. #define    SARMAG        8        /* strlen(ARMAG); */
  44.  
  45. #define    AR_EFMT1    "#1/"        /* extended format #1 */
  46.  
  47. struct ar_hdr {
  48.     char ar_name[16];        /* name */
  49.     char ar_date[12];        /* modification time */
  50.     char ar_uid[6];            /* user id */
  51.     char ar_gid[6];            /* group id */
  52.     char ar_mode[8];        /* octal file permissions */
  53.     char ar_size[10];        /* size in bytes */
  54. #define    ARFMAG    "`\n"
  55.     char ar_fmag[2];        /* consistency check */
  56. };
  57.  
  58. class CARArray : public CArray
  59. {
  60. public:
  61.     virtual void IARArray( Handle itsData);
  62. };
  63.